package com.turing.data.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.turing.data.service.ResultStatisticService;

@RestController
@RequestMapping("statistic")
public class ResultStatisticController {

    @Autowired
    private ResultStatisticService resultStatisticService;

    @GetMapping("correctness")
    public String calculateCorrectness(String templateSn, Integer eleId, String dateBegin, String dateEnd) {
        return resultStatisticService.calculateCorrectnessByModelValue(templateSn, eleId, dateBegin, dateEnd);
    }

}
